<?php
/**
 * Foreign key schema representation
 * @author Artur Kmera <artur.kmera@3code.pl>
 * @version 0.9
 * @package ORM
 * @subpackage Schema
 * @link http://arrowplatform.org/orm
 * @copyright 2011 Arrowplatform 
 * @license GNU LGPL
*/
class ForeignKey implements ISchemaElement{

	/**
	 * Foreign table object
	 * @var Table
	 */
	public $foreignTable;
	/**
	 * On update action
	 * @var unknown_type
	 */
	public $onUpdate;
	/**
	 * On delete action
	 * @var unknown_type
	 */
	public $onDelete;
	
	/**
	 * Local field
	 * @var Field
	 */
	public $localReference;
	
	/**
	 * Foreign field
	 * @var Field
	 */
	public $foreignReference;
	
	
	/**
	 * (non-PHPdoc)
	 * @see ISchemaElement::toString()
	 */
	public function toString(){
		return "Type: ForeignKey, Name: {$this->name}";
	}
	/**
	 * (non-PHPdoc)
	 * @see ISchemaElement::toArray()
	 */
	public function toArray(){
	
		return array(
	
		);
	}
}

?>